# New ports collection makefile for:   labman2
# Date created:         25 may 2011
# Whom:                 Vladimir Chukharev
#
# $FreeBSD$
#

PORTNAME=	labman2
PORTVERSION=	0.1.r${SVN_REV}
CATEGORIES=	science www databases python
MASTER_SITES=	${MASTER_SITE_LOCAL}

MAINTAINER=	Vladimir.Chukharev@gmail.com
COMMENT=	A database for scientific experiment results with a web interface

USE_BZIP2=	yes
USE_PYTHON=	2.4+
PYNUMPY=	YES

RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}django>=1.6:${PORTSDIR}/www/py-django \
		${PYTHON_PKGNAMEPREFIX}django-allauth>=0.18.0:${PORTSDIR}/www/py-django-allauth \
		${PYTHON_PKGNAMEPREFIX}psycopg2>=2.5:${PORTSDIR}/databases/py-psycopg2
FETCH_DEPENDS+=	svn:${PORTSDIR}/devel/subversion

SVNROOT?=	http://labman2.googlecode.com/svn/trunk/
SVN_REV=	8
NO_BUILD=	yes
NO_INSTALL=	yes
LICENSE=	MIT

.include <bsd.port.pre.mk>
do-install:
	${MKDIR} ${WWWDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/__init__.py ${WWWDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/manage.py ${WWWDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/settings.py ${WWWDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/urls.py ${WWWDIR}
gen-dist:
	${MKDIR} ${WRKDIR}
	${RM} -rf ${WRKSRC}
	svn export -r ${SVN_REV} ${SVNROOT} ${WRKSRC}
	${TAR} -cvy -C ${WRKDIR} -f ${DISTDIR}/${DISTNAME}.tar.bz2 ${DISTNAME}
.include <bsd.port.post.mk>
